Modem microprocessors utilize various techniques to improve data processing efficiency. A number of these techniques may give rise to problems of detecting numerical overlaps such as address range overlaps. "Advance loading" is an example of one such technique. An advance load allows load instructions to be scheduled ahead of undisambiguated store instructions, thus reducing data cache misses and indirectly improving data processing efficiency. Advance loading functionality may be implemented in a number of ways. In the following description, advance loading takes advantage of an address table, referred to herein as an "advanced load address table" (ALAT).
The mechanism of the ALAT is as follows: When a load instruction is moved, for example by the compiler, ahead of an undisambiguated store instruction, the load instruction is converted into an advance load instruction. A check instruction is then placed at the original location of the load instruction. An advance load instruction enters its address range and its destination register physical identifier into the ALAT. Meanwhile the ALAT snoops the physical address of every store instruction and invalidates all ALAT entries having an overlapping address range. The ALAT performs the snoop by comparing the address range of every store instruction it processes with every advance load instruction stored in the table.
The check instruction queries the ALAT to determine whether the advance load address was partially or completely overwritten by the store instruction by matching its own destination register physical identifier with all those still valid in the table. If a match is found, the ALAT mechanism recognizes that the snoop did not invalidate the advance load address. The advance load address is therefore still valid and the processor may continue processing. If a match is not found, however, due to either an overlapping store invalidate or table overflow, the ALAT mechanism recognizes that the advance load is no longer valid and the data will have to be reloaded. If the advance load data has already been consumed, the check instruction fails and the ALAT will raise an exception to invoke recovery code.
The advance load technique thus gives rise to the need to detect address range overlaps between advance loads and stores. For example, if there is an advance load of 4 bytes from address 'h0 ('h0-'h3), and then a store of 1 byte into 'h2, the initial advance load should be reexecuted because the 1 byte of data stored in 'h2 will have replaced parts of the original advance loaded data. In order to address this issue, the ALAT records the address and the data size of each advance load and uses this information to compare the advance load and store addresses against each other to detect any true overlap.
This address range comparison may be performed by hardware components. To do so, however, the current microprocessor hardware architecture must be extended with numerous comparator circuits. This type of burden on the hardware is extremely costly, and as such, an alternative method of detecting address range overlaps is desirable.